interface A{
    void swimming();
}

interface B{
    public static final int age = 10;
    /**成员变量默认是 public static final*/
    public abstract void walking();
    /**成员方法默认是 public abstract，不可以具体实现*/
    default void print(){
        System.out.println("除非加default修饰！");
    }
}
interface C extends A,B{
    void sleeping();
}
class D implements C{
    String name;
    @Override
    public void swimming() {
        System.out.println(name + "正在游泳！");
    }
    @Override
    public void walking() {
        System.out.println(name + "正在走路！");
    }

    @Override
    public void sleeping() {
        System.out.println(name + "正在睡觉！");
    }

    public D(String name) {
        this.name = name;
    }
}
public class Test {
    public static void main(String[] args) {
        D dog = new D("lisa");
        dog.swimming();
        dog.sleeping();
        dog.walking();
        dog.print();
    }
}
